import React, { useState } from "react";
import './head.scss'
import Icon from "../common/IconComponent";
const Head = () => {
  let headList = ['首页', '记录']
  let [activeIndex, setActiveIndex] = useState(0)
  return <>
    <div className="headBox">
      <div className="contianer">
        <div className="headMenu">
          {headList.map((item, index) => {
            return <div onClick={() => setActiveIndex(index)} className={`headItem ${activeIndex == index && 'activeItem'}`} key={index}>{item}</div>
          })}
        </div>
      </div>
    </div>
  </>
}

export default Head;